Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Posts: Fix video overflow in full content mode #61538

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

amitraj2203
Copy link
Contributor

@amitraj2203 amitraj2203 commented May 9, 2024

What?

Fixes: #61477

Why?

It makes videos contained within the allocated space in the latest posts block by setting appropriate width. Fixes overflow and overlap issues when 'Show full post' option is enabled, preventing horizontal scroll bars.

How?

Enqueues the styles for video, cover and media-text block in Latest Posts block,

Testing Instructions

  1. Add a latests posts block
  2. Enable "Post content > Show full post" in the block settings panel of the latests post block.

Testing Instructions for Keyboard

NIL

Screenshots or screencast

image
image

@amitraj2203 amitraj2203 requested a review from ajitbohra as a code owner May 9, 2024 17:15
Copy link

github-actions bot commented May 9, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: amitraj2203 <[email protected]>
Co-authored-by: carolinan <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@carolinan
Copy link
Contributor

Hi, thank you for the PR. The proposed change loads all the CSS for the video, cover and media & text blocks even when they are not on the page, including all the CSS that is unrelated to the width of the video.
I think it would be more performant to only limit the width of the video as part of the CSS for the latest posts block.

Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid loading the additional CSS when the inner blocks are not used, and limit the scope of the change to the width of videos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block [Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants